<?php

namespace App\Common\WX\App;


use App\Common\WX\Api\OfficialAccount;
use App\Common\WX\WxWord;
use App\Traits\TraitCommon;

abstract class WxAppBase
{
    use TraitCommon;

    abstract function funcHandle(WxWord $word, $wx_from);


    /**
     * @return OfficialAccount
     * @throws \EasySwoole\Mysqli\Exceptions\ConnectFail
     * @throws \EasySwoole\Mysqli\Exceptions\PrepareQueryFail
     * @throws \Throwable
     */
    protected function getOfficialAccount()
    {
        $app = OfficialAccount::funcIns($this->funcGetX__config(), true);

        return $app;
    }
}